package com.cloud.pole.feign;

import java.util.List;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cloud.pole.api.user.UserCollectionApi;
import com.cloud.pole.common.constant.ApiConstant;
import com.cloud.pole.common.msg.ApiRestResponse;
import com.github.pagehelper.PageInfo;

/*
*2019年2月21日
*cloud-shop
*author:frank-chen
*/
@FeignClient(value = ApiConstant.USER_SERVICE_ID)
public interface IUserCollectionService {
	
	  @RequestMapping(value=ApiConstant.USER_SERVICE_GET_USER_COLLECTION, method = RequestMethod.GET)
	  public ApiRestResponse<UserCollectionApi> getUserCollection(
			  @RequestParam(name="userId", defaultValue = "") Long userId,
			  @RequestParam(name="objectTypeId", defaultValue = "") Integer objectTypeId,
			  @RequestParam(name="objectId", defaultValue = "") String objectId);
	  
	  @RequestMapping(value=ApiConstant.USER_SERVICE_ADD_USER_COLLECTION, method = RequestMethod.GET)
	  public ApiRestResponse<Boolean> addUserCollection(
			  @RequestParam(name="userId", defaultValue = "") Long userId,
			  @RequestParam(name="userName", defaultValue = "") String userName,
			  @RequestParam(name="objectName", defaultValue = "") String objectName,
			  @RequestParam(name="objectTypeId", defaultValue = "") Integer objectTypeId,
			  @RequestParam(name="objectId", defaultValue = "") String objectId,
			  @RequestParam(name="note", defaultValue = "") String note);
	  
	  
	  @RequestMapping(value=ApiConstant.USER_SERVICE_CANCEL_USERCOLLECTION, method = RequestMethod.GET)
	  public ApiRestResponse<Boolean> cancelUserCollection(
			  @RequestParam(name="userId", defaultValue = "") Long userId,
			  @RequestParam(name="objectTypeId", defaultValue = "") Integer objectTypeId,
			  @RequestParam(name="objectId", defaultValue = "") String objectId);
	  
	  @RequestMapping(value=ApiConstant.USER_SERVICE_USERCOLLECTION_GETPAGECOLLECTIONLIST, method = RequestMethod.GET)
	  public ApiRestResponse<PageInfo<UserCollectionApi>> getPageGoodsCollectionList(
			  @RequestParam(name="userId", defaultValue = "") Long userId,
			  @RequestParam(name="objectTypeId", defaultValue = "") Integer objectTypeId,
			  @RequestParam(name="pageNum", defaultValue = "") Integer pageNum,
			  @RequestParam(name="pageSize", defaultValue = "") Integer pageSize);
	  	  
}
